﻿using System.Text.RegularExpressions;

namespace RatingAuthor
{
  internal static class PagesCountParser
  {

    private static readonly Regex Pages =
      new Regex("Страниц\\s*\\((?<1>\\d*)\\):", RegexOptions.Compiled);

    public static int Parse(string text)
    {
      var m = Pages.Match(text);
      return m.Success ? int.Parse(m.Groups[1].Value) : 0;
    }

  }
}